package com.jxtc.enterprise.hr.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

@Schema(description = "用于新增员工信息的数据")
@Getter
@Setter
@ToString
public class EmployeeDTO {

    @Schema(description = "员工所属公司 ID", example = "c752804d0cd410267f404dd3f0457a57")
    @NotBlank(message = "公司 ID 不能为空")
    private String companyId;

    @Schema(description = "员工名称", example = "张三")
    @NotBlank(message = "员工名称不能为空")
    private String name;

    @Schema(description = "部门 ID", example = "c752804d0cd410267f404dd3f0457a57")
    @NotBlank(message = "部门 ID 不能为空")
    private String departmentId;

    @Schema(description = "登录账号 1~11位，手机号 或 字母+数字组合", example = "15011115555 或 clp20250703")
    @NotBlank
    @Size(message = "登录账号 1~11位，手机号 或 字母+数字组合", min = 1, max = 11)
    private String phoneNumber;

    @Schema(description = "新密码", example = "123456")
    private String password;

    @Schema(description = "员工每餐限购份数", example = "1", defaultValue = "1")
    @Min(value = 0, message = "限购份数不能小于 0")
    private Integer limitCount;
}
